from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import time


branch='v2.01.13'

version='.3'

branchversion =  branch+version

#获取浏览器对象
browser =  webdriver.Chrome()
browser.get("http://git.sendinfo.com/")
# username  = browser.find_element(By.XPATH,'//*[@id="app"]/div/div/div[2]/div[2]/div/form/div[1]/div/div/input')




stand = browser.find_element(By.XPATH,'/html/body/div/div[2]/div/div[2]/div[2]/div/ul/li[2]/a').click()

username  = browser.find_element(By.ID,'user_login')
username.send_keys('wangjun')

password  = browser.find_element(By.ID,'user_password')
password.send_keys('wj123456*')

login = browser.find_element(By.XPATH,'//*[@id="new_user"]/div[5]/input')
login.click()


standlone = browser.find_element(By.XPATH,'//a[contains(@href,\'/BasicBusiness/Taiyuan_research_and_development/sendinfo-business-standalone\')]')
standlone.click()


pom = browser.find_element(By.XPATH,'//*[@id="tree-slider"]/tbody/tr[9]/td[1]/a/span')
pom.click()

editpom = browser.find_element(By.XPATH,'//a[contains(@href,\'/BasicBusiness/Taiyuan_research_and_development/sendinfo-business-standalone/edit/master/pom.xml\')]').click()


dockertag = browser.find_element(By.XPATH,'//span[contains(text(),\'docker-tag\')]')
print(dockertag.text)


time.sleep(10)
browser.close()
